<template>
	<uni-popup ref="popup" type="dialog">
		<view class="dialog-wrap">
			<view class="title">{{$t('home.popup-prompt')}}</view>
			<view class="cont">{{$t('home.popup-prompt-cont1')}}，<br />{{$t('home.popup-prompt-cont2')}}? </view>
			<view class="btn-box flex_a">
				<view class="btn-item flex_col" @click="close">{{$t('home.btn-cancel')}}</view>
				<view class="btn-item flex_col active" @click="confirm">{{$t('home.btn-end')}}</view>
			</view>
		</view>
	</uni-popup>
</template>

<script>
	export default {
		name: 'PopupTips',
		data() {
			return {

			}
		},
		methods: {
			open() {
				this.$refs.popup.open();
			},
			close() {
				this.$refs.popup.close();
			},
			confirm() {
				this.$refs.popup.close();
				this.$emit('confirm');
			}
		}
	}
</script>

<style lang="scss" scoped>
	.dialog-wrap {
		text-align: center;
		padding: 50rpx;
		background: #fff;
		border-radius: 20rpx;

		.title {
			color: #999999;
		}

		.cont {
			line-height: 51rpx;
			margin: 60rpx 0;
		}

		.btn-box {
			.btn-item {
				width: 244rpx;
				height: 80rpx;
				background: #E4E4E4;
				border-radius: 15rpx;
				text-align: center;
			}

			.active {
				background: #AF9453;
				color: #fff;
				margin-left: 20rpx;
			}
		}
	}
</style>